<!---

Kalendar Categories admin

COPYRIGHT & LICENSING INFO
-------------------------------------------------------------------

Copyright 2006 TJ Downes - tdownes@sanative.net - http://www.sanative.net

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

--->
<cfform action="#cgi.SCRIPT_NAME#" method="post" id="categoriesForm" style="margin:0; padding:0;">
<input type="hidden" name="CategoryID" value="<cfoutput>#category.CategoryID#</cfoutput>" />
<cfif NOT Compare(appAction, "addCategory")>
<input type="hidden" name="appAction" value="createCategory" />
<cfelse>
<input type="hidden" name="appAction" value="updateCategory" />
</cfif>
<div id="categoriescontainer">
	<div id="categoriescolumn">
	<cfselect name="CategoryIDSelector" style="height: 100%; min-width: 250px; border-left: none; border-top: none; border-bottom: none; font-size: 16px;" size="32" query="returnedCategories" display="CategoryName" value="CategoryID" onclick="getCategory();" /> 
	</div>
	<div id="categorieseditor">
		<fieldset>
		<div id="colorswatch"><cfoutput>#category.CategoryName# style</cfoutput></div>
		<legend>Use the field below to add or edit your categories</legend>
		<div>
		<label for="CategoryName">Category:</label><br />
		<cfif Left(Server.ColdFusion.ProductVersion, 1) lt 7><cfinput type="text" name="CategoryName" size="20" maxlength="50" class="inputtextfield" value="#category.CategoryName#" required="true" message="Category Name is a required field." style="font-size: 14px; padding-left: 6px;" /><cfelse><cfinput type="text" name="CategoryName" size="20" maxlength="50" class="inputtextfield" value="#category.CategoryName#" required="true" validate="noblanks" message="Category Name is a required field." style="font-size: 14px; padding-left: 6px;" /></cfif>
		</div>
		<div style="margin-bottom: 20px;">
		<label for="CategoryBGColor">Background Color:</label><br />
		<cfinput type="text" id="CategoryBGColor" name="CategoryBGColor" size="15" maxlength="6" class="inputtextfield" value="#category.CategoryBGColor#" onclick="openColorPickerAdv();" onfocus="handleFocus(this.id);changeBGColor();" />
		</div>
		<div style="margin-bottom: 20px;">
		<label for="CategoryHexDecColor">Text Color:</label><br />
		<cfinput type="text" id="CategoryTextColor" name="CategoryTextColor" size="15" maxlength="6" class="inputtextfield" value="#category.CategoryTextColor#" onclick="openColorPickerAdv();" onfocus="handleFocus(this.id);changeTextColor();" />
		</div>
	</fieldset>	
	<cfif NOT Compare(appAction, "addCategory")><input type="submit" name="submitbutton" value="create category" class="button" /><cfelse><input type="submit" name="submitbutton" value="update category" class="button" /> <input type="button" name="deletebutton" value="delete category" class="deletebutton" onclick="deleteCategory();" /> <input type="button" name="cancelbutton" value="cancel" class="deletebutton" onclick="cancelEdit();" /></cfif>
	</div>
	<div id="colorPickerAdvDiv" style="visibility:hidden;padding:0;position:absolute;z-index:1">
		<iframe id="colorPickerAdv"  width="350" src="<cfoutput>#application.KConfig.getJavascriptPath()#</cfoutput>color/colorPickerAdv.html" height="142" style="border-style:outset;border-width:2px;" marginwidth=0 marginheight=0 noresize frameborder=0 border=0></iframe>
	</div>
</div>
</cfform>